<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //删除
        var arr=[11,2,444,55,234]
        console.log(arr);
        arr.splice(2,1)
        console.log(arr);

        //替换
        console.log("---------------");
        var arr2=[11,2,444,55,234]
        console.log(arr2);
        arr2.splice(2,1,23)
        console.log(arr2);

        // 插入
        console.log("---------------");
        var arr3=[11,2,444,55,234]
        console.log(arr3);
        arr3.splice(2,0,5555)
        console.log(arr3);
    </script>
</body>
</html>